﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using Kaiser.Modules.Cubic.DomainModel.Advert;
using Kaiser.Modules.Cubic.DomainModel.Board;
using Kaiser.Modules.Cubic.DomainModel.News;
using Kaiser.Modules.Cubic.DomainModel.Product;

namespace Kaiser.Modules.Cubic.Services
{
    [ServiceContract]

    public interface ICubicService
    {
        [OperationContract]
        ProductDetail GetProduct(string id);

        /// <summary>
        /// 返回产品的列表通过分类
        /// </summary>
        /// <param name="categoryId"></param>
        /// <returns></returns>
        [OperationContract]
        IList<ProductDetail> GetProductsByCategoryCode(string categoryId);

        /// <summary>
        /// 返回所有的产品分类(当ParentId为空时)
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        IList<ProductCategory> GetProductCateogrys(string categoryParentId);

        /// <summary>
        /// 返回产品分类的具体内容
        /// </summary>
        /// <param name="categoryId"></param>
        /// <returns></returns>
        [OperationContract]
        ProductCategory GetProductCategory(string categoryId);


        [OperationContract]
        ProductCategory GetProductCategoryByCode(string categoryCode);

        [OperationContract]
        NewsCategory GetNewsCategoryByCode(string categoryCode);


        /// <summary>
        /// 返回新闻栏目
        /// </summary>
        /// <param name="categoryCode"></param>
        /// <returns></returns>
        [OperationContract]
        IList<NewsCategory> GetNewsCategorysByParentCode(string categoryCode);

        /// <summary>
        /// 返回新闻列表通过新闻分类
        /// </summary>
        /// <param name="categoryId"></param>
        /// <returns></returns>
        [OperationContract]
        IList<NewsDetail> GetNewsByCategoryId(string categoryId);


        [OperationContract]
        string AddMessage(Message msg);

        /// <summary>
        /// 返回新闻详细内容
        /// </summary>
        /// <param name="newsId"></param>
        /// <returns></returns>
        [OperationContract]
        NewsDetail GetNews(string newsId);

        /// <summary>
        /// 返回新闻详细内容
        /// </summary>
        /// <param name="newsId"></param>
        /// <returns></returns>
        [OperationContract]
        NewsDetail GetNewsByCode(string newsCode);


        [OperationContract]
        AdvertSpace GetAdvertSpaceByCode(string code);
    }
}
